<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <?php include_http_metas() ?>
    <?php include_metas() ?>
    <title><?php include_slot('title', 'TrueTrader - Votre guide en bourse') ?></title>
    <link rel="shortcut icon" href="/favicon.ico" />
    <?php include_stylesheets() ?>
    <?php use_javascript('jquery-1.4.2.min.js') ?>
    <?php use_javascript('functions.js') ?>
    <?php include_javascripts() ?>
  </head>
  <body>
    <div id="container">
      <div id="header">
        <div class="content">
          <div id="menu_top">
            <span id="menu_top_right">
              <?php if (!$sf_user->isAuthenticated()): ?>
                <?php echo link_to(__('Sign in'), 'sf_guard_signin') ?>
                |
                <?php echo link_to(__('Register'), 'sf_guard_register') ?>
              <?php else: ?>
                <span class="auth_link"><?php echo link_to(__('Logout'), 'sf_guard_signout') ?></span>
              <?php endif ?>
            </span>
            <span id="menu_top_left">
              <?php echo link_to(__('Home'), 'homepage') ?>
              <span class="auth_link">
                <?php if ($sf_user->isAuthenticated()): ?>
                  <?php echo link_to(__('Trader : %username%', array('%username%' => ucfirst($sf_user->getTrader()->getUsername())), 'messages'), 'trader_home', $sf_user->getTrader()) ?>
                <?php endif ?>
              </span>
              <?php if ($sf_user->isAuthenticated()): ?>
                <?php echo link_to(__('Traders'), 'trader') ?>
                <?php //echo link_to(__('Stocks'), 'stock_exchange') ?>
                <span class="auth_link"><?php //echo link_to(__('Profile'), 'trader_show', $sf_user->getGuardUser()) ?></span>
                <span class="auth_link"><?php //echo link_to(__('Trading'), 'homepage') ?></span>
                <?php //if (count($sf_user->getguardUser()->getTradingUserGroups()) > 0): ?>
                  <span class="auth_link"><?php //echo link_to(__('Groups'), 'group_user', $sf_user->getGuardUser()) ?></span>
                <?php //endif ?>
                <?php //if (($trading_group = $sf_user->getGuardUser()->getTradingGroup()) == ''): ?>
                  <span class="auth_link"><?php //echo link_to(__('Create your group'), 'group_new') ?></span>
                <?php //else: ?>
                  <span class="auth_link"><?php //echo link_to(__('My group'), 'group_show', $trading_group) ?></span>
                <?php //endif ?>
                <span class="auth_link"><?php //echo link_to(__('Group list'), 'group') ?></span>
              <?php endif ?>
            </span>
          </div>
          <div id="logo">
            <h1><a href="<?php echo url_for('homepage') ?>" alt="TrueTrader logo"><img src="/images/logo.png" /></a></h1>
          </div>
        </div>
      </div>

      <div id="content">
        <div class="content">
          <?php echo $sf_content ?>
        </div>
      </div>
      
      <div id="footer">
        <div class="content">
          <span class="TrueTrader">
            TrueTrader créé par Réouven Weiller
          </span>
          <?php include_component('language', 'language') ?>
        </div>
      </div>

    </div>
  </body>
</html>
